<?php
	require_once("../inc/authorize.php");
	if($_GET["user"]) $stat = login($_GET["user"], $_GET["pass"]);
	else $stat = login($_POST["user"], $_POST["pass"]);

	if($stat == 0) {
		header("Location: main.php"); /* inne */
		exit();
	}
	else {
		header("Location: index.php?l=$stat"); /* gick inte */
		exit();
	}
?>


